package com.cy.pj.common.utils;

import com.cy.pj.sys.pojo.Admin;
import org.apache.shiro.SecurityUtils;

/**
 * @author shuidehuiyi@gmail.com
 * @date 2020/6/23 19:55
 */
public class ShiroUtils {
    public static String getUsername() {
        return getUser().getUserName();
    }
    public static Admin getUser() {
        return  (Admin) SecurityUtils.getSubject().getPrincipal();
    }
}
